package com.zhiyou100.controller;

import java.util.ArrayList;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class turnoverController {
	@RequestMapping("/turnover")
	public String turn() {
		return "forward:/turnover.jsp";
	}
	
	@RequestMapping("/turnover2")
	@ResponseBody
	public double[] showEcharts() {
		double[] month = {100.0,90.0,80.0,70.0,60.0,50.0,40.0};
		return month;
	}
	
	@RequestMapping("statistics")
	public String statistics() {
		return "forward:/turnover2.jsp";
	}
	
	@RequestMapping("statistics2")
	@ResponseBody
	public ArrayList<int[]> statistics2() {
		System.out.println("进入多线controller");
		int[] i1= {21,22,23,45,45,78,78};
		int[] i2= {78,48,46,74,42,72,78};
		int[] i3= {35,35,99,44,46,23,12};
		int[] i4= {65,57,45,34,23,12,35};
		int[] i5= {23,63,56,90,89,89,89};
		ArrayList<int[]> lists = new ArrayList<>();
		lists.add(i1);
		lists.add(i2);
		lists.add(i3);
		lists.add(i4);
		lists.add(i5);
		return lists;
	}
}
